package com.tentcoo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tentcoo.dao.TeacherDao;
import com.tentcoo.entity.TeacherEntity;
import com.tentcoo.service.TeacherService;

@Service
public class TeacherServiceImpl implements TeacherService{
	@Autowired
	private TeacherDao teacherDao;

	@Transactional
	@Override
	public boolean addTeacher(TeacherEntity teacherEntity) {
		return teacherDao.addTeacher(teacherEntity);
	}

	@Transactional
	@Override
	public boolean delTeacher(String no) {
		return teacherDao.delTeacher(no);
	}

	@Transactional
	@Override
	public boolean updateTeacher(TeacherEntity teacherEntity) {
		return teacherDao.updateTeacher(teacherEntity);
	}

	@Transactional
	@Override
	public TeacherEntity findTeacher(String no) {
		return teacherDao.findTeacher(no);
	}
	
}
